#!/usr/bin/perl
use warnings;
use strict;
require 'appointment.pl';
clear("sched.tex");
my $doctor = $ARGV[0];
system("cat head1 >> sched.tex");
echo("sched.tex", pretty_date());
system("cat head2 >> sched.tex");
foreach my $doctor (get_doctors()){
	my $row = make_row($doctor);
	echo("sched.tex", "'" . $row . "'");
	system("cat newline >> sched.tex");
}
system("cat foot >> sched.tex");
system("pdflatex sched.tex");
system("rm sched.aux sched.log sched.tex");